package cc.iotkit.data.mapper;

import cc.iotkit.data.model.TbSysRole;
import cc.iotkit.model.system.SysRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: 石恒
 * @Date: 2023/7/26 8:07
 * @Description:
 */
@Mapper
public interface SysRoleMapper extends BaseMapper<TbSysRole> {
    List<Long> selectRoleListByUserId(@Param("userId") Long userId);

    List<TbSysRole> selectRolePermissionByUserId(@Param("userId") Long userId, @Param("delFlag") String delFlag);

    List<TbSysRole> selectRoleList(@Param("role") SysRole role, @Param("delFlag") String delFlag);

    List<TbSysRole> findByUserId(@Param("id") Long id);
}
